// InstanceModule.ts
import { defineStore } from 'pinia';

interface InstanceModuleState {
  instance: string | null;
  selectedNode: any | null;
}
export const useInstanceModuleStore = defineStore({
  id: 'instance-module',
  state: (): InstanceModuleState => ({
    instance: null,
    selectedNode: null,
  }),
  getters: {
    getInstance(state): any {
      return state.instance;
    },
    getSelectedNode(state): any{
      return state.selectedNode;
    }
  },
  actions: {
    setInstance(value: any) {
      this.instance = value;
    },
    setSelectedNode(value: any) {
      this.selectedNode = value;
    },
  },
});
